From: Dan Winship Date: Wed, 17 Nov 2010 16:43:08 +0000 (-0500) Subject: shell: remove ShellProcess X-Git-Tag: archive/raspbian/50.5-1+rpi1~1^2~1013^2^2~9286 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=9ddf19a1a48b14ff14025dc0a9b45dd9517299dc;p=gnome-shell.git shell: remove ShellProcess ShellProcess only existed to work around gjs bugs that have long since been fixed, and has now been obsoleted by Util.spawn*. Kill it. https://bugzilla.gnome.org/show_bug.cgi?id=635089 --- diff --git a/src/Makefile.am b/src/Makefile.am index fa9804b72..0740f0667 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -59,7 +59,6 @@ shell_public_headers_h = \ shell-embedded-window.h \ shell-generic-container.h \ shell-gtk-embed.h \ - shell-process.h \ shell-global.h \ shell-perf-log.h \ shell-slicer.h \ @@ -90,7 +89,6 @@ libgnome_shell_la_SOURCES = \ shell-embedded-window.c \ shell-generic-container.c \ shell-gtk-embed.c \ - shell-process.c \ shell-global.c \ shell-perf-log.c \ shell-slicer.c \ diff --git a/src/shell-process.c b/src/shell-process.c deleted file mode 100644 index afa3abdf6..000000000 --- a/src/shell-process.c +++ /dev/null @@ -1,129 +0,0 @@ -/* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*- */ - -#include "config.h" - -#include "shell-process.h" - -#include -#include - -struct _ShellProcessPrivate { - char **args; - GPid pid; -}; - -enum { - PROP_0, - PROP_ARGS, -}; - -static void shell_process_dispose (GObject *object); -static void shell_process_finalize (GObject *object); -static void shell_process_set_property ( GObject *object, - guint property_id, - const GValue *value, - GParamSpec *pspec ); -static void shell_process_get_property( GObject *object, - guint property_id, - GValue *value, - GParamSpec *pspec ); - -G_DEFINE_TYPE( ShellProcess, shell_process, G_TYPE_OBJECT); - -static void shell_process_class_init( ShellProcessClass *klass) -{ - GObjectClass *gobject_class = (GObjectClass *)klass; - - gobject_class->dispose = shell_process_dispose; - gobject_class->finalize = shell_process_finalize; - gobject_class->set_property = shell_process_set_property; - gobject_class->get_property = shell_process_get_property; - - g_object_class_install_property (gobject_class, - PROP_ARGS, - g_param_spec_boxed ("args", - "Arguments", - "", - G_TYPE_STRV, - G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY)); - -} - -static void shell_process_init (ShellProcess *self) -{ - self->priv = g_new0 (ShellProcessPrivate, 1); -} - -static void shell_process_dispose (GObject *object) -{ - G_OBJECT_CLASS (shell_process_parent_class)->dispose(object); -} - -static void shell_process_finalize (GObject *object) -{ - ShellProcess *self = (ShellProcess*)object; - - g_free (self->priv); - g_signal_handlers_destroy(object); - G_OBJECT_CLASS (shell_process_parent_class)->finalize(object); -} -static void shell_process_set_property ( GObject *object, - guint property_id, - const GValue *value, - GParamSpec *pspec ) -{ - ShellProcess* self = SHELL_PROCESS(object); - switch (property_id) { - case PROP_ARGS: - self->priv->args = (char**) g_value_dup_boxed (value); - break; - default: - G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec); - break; - } -} - - -static void shell_process_get_property ( GObject *object, - guint property_id, - GValue *value, - GParamSpec *pspec ) -{ - ShellProcess* self = SHELL_PROCESS(object); - switch (property_id) { - case PROP_ARGS: - g_value_set_boxed (value, self->priv->args); - break; - default: - G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec); - break; - } -} - -ShellProcess* shell_process_new(char **args) -{ - return (ShellProcess*) g_object_new(SHELL_TYPE_PROCESS, - "args", args, - NULL); -} - -gboolean -shell_process_run (ShellProcess *self, - GError **error) -{ - return g_spawn_async (NULL, self->priv->args, NULL, - G_SPAWN_SEARCH_PATH, NULL, NULL, - &self->priv->pid, - error); -} -/* -int -shell_process_wait (ShellProcess *self) -{ - int status; - - waitpid ((pid_t) self->priv->pid, &status, 0); - - return status; -} -*/ diff --git a/src/shell-process.h b/src/shell-process.h deleted file mode 100644 index ef6b2a878..000000000 --- a/src/shell-process.h +++ /dev/null @@ -1,37 +0,0 @@ -/* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*- */ -#ifndef __SHELL_PROCESS_H__ -#define __SHELL_PROCESS_H__ - -#include - -#define SHELL_TYPE_PROCESS (shell_process_get_type ()) -#define SHELL_PROCESS(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), SHELL_TYPE_PROCESS, ShellProcess)) -#define SHELL_PROCESS_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), SHELL_TYPE_PROCESS, ShellProcessClass)) -#define SHELL_IS_PROCESS(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), SHELL_TYPE_PROCESS)) -#define SHELL_IS_PROCESS_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), SHELL_TYPE_PROCESS)) -#define SHELL_PROCESS_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), SHELL_TYPE_PROCESS, ShellProcessClass)) - -typedef struct _ShellProcess ShellProcess; -typedef struct _ShellProcessClass ShellProcessClass; - -typedef struct _ShellProcessPrivate ShellProcessPrivate; - -struct _ShellProcess -{ - GObject parent; - - ShellProcessPrivate *priv; -}; - -struct _ShellProcessClass -{ - GObjectClass parent_class; - -}; - -GType shell_process_get_type (void) G_GNUC_CONST; -ShellProcess* shell_process_new(char **args); - -gboolean shell_process_run (ShellProcess *process, GError **error); - -#endif /* __SHELL_PROCESS_H__ */